package com.tc.factory.impl;

import com.tc.dto.Result;
import com.tc.factory.ResultFactory;

public class ResultFactoryImpl implements ResultFactory {
    @Override
    public Result success() {
        return new Result(1,"success",null);
    }

    @Override
    public Result success(Object data) {
        return new Result(1,"success",data);
    }

    @Override
    public Result error(String msg) {
        return new Result(0,msg,null);
    }
}
